<template>
  <div>
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>权限管理</el-breadcrumb-item>
      <el-breadcrumb-item>权限列表</el-breadcrumb-item>
    </el-breadcrumb>
    <el-table style="" :data="RightsList">
      <el-table-column label="#" type="index"> </el-table-column>
      <el-table-column label="权限名称" prop="authName"> </el-table-column>
      <el-table-column label="路径" prop="path"> </el-table-column>
      <el-table-column label="权限等级" prop="level">
        <template slot-scope="scope">
            <el-tag :type="scope.row.level==0?'':scope.row.level==1?'success':'warning'">{{scope.row.level==0?'一级':scope.row.level==1?'二级':'三级'}}</el-tag>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
import { powerList } from "@/http/Rights";
export default {
  data() {
    return {
      RightsList: [],
      type:0
    };
  },
  methods: {
    async getRights() {
      let res = await powerList("list");
      console.log(res);
      this.RightsList = res.data;
    },
  },

  mounted() {
    this.getRights();
  },
};
</script>